package cn.ztr.ymcc.feign;

import cn.ztr.ymcc.feign.impl.EmployeeFeignImpl;
import cn.ztr.ymcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-system",fallbackFactory = EmployeeFeignImpl.class)
public interface EmployeeFeign {
    /**
     * 根据id获取员工信息
     * @param id
     * @return
     */
    @GetMapping("/employee/{id}")
    public JsonResult get(@PathVariable("id")Long id);

    /**
     * 根据id获取员工登录信息
     * @param id
     * @return
     */
    @GetMapping("/employee/login/{id}")
    public JsonResult getByLoginId(@PathVariable("id")Long id);
}
